<template>
  <div class="m-table-list">
    <div class="add-box">
      <el-button class="add-btn" type="primary"><i class="el-icon-plus"></i> 添加任务</el-button>
    </div>
    <el-table
      :data="tableData"
      style="width: 100%">
      <el-table-column
        label="任务描述"
        width="180">
        <template slot-scope="scope">
          <span style="margin-left: 10px">{{ scope.row.thing }}</span>
        </template>
      </el-table-column>
      <el-table-column
        label="客户"
        width="180">
        <template slot-scope="scope">
          <el-popover trigger="hover" placement="top">
            <p>电话: {{ scope.row.phone }}</p>
            <p>住址: {{ scope.row.address }}</p>
            <div slot="reference" class="name-wrapper">
              <el-tag size="medium">{{ scope.row.name }}</el-tag>
            </div>
          </el-popover>
        </template>
      </el-table-column>
      <el-table-column label="操作">
        <template slot-scope="scope">
          <el-button
            size="mini"
            type="primary"
            @click="handleEdit(scope.$index, scope.row)">置为{{btn}}</el-button>
          <el-button
            size="mini"
            type="danger"
            @click="handleDelete(scope.$index, scope.row)">删除</el-button>
        </template>
      </el-table-column>
    </el-table>
  </div>
</template>

<script src="./mTodoTable.js"></script>

<style lang="scss" scoped>
.m-table-list{
  width: 540px;
  .add-box{
    text-align: left;
    padding: 0 0 10px 15px;
  }
}
</style>
